package com.atguigu.java;

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("hello world");
        Person p1 = new Person("Tom", 30);
        p1.setAge(26);
        p1.setName("tom");
        System.out.println("p1 = " + p1);
    }
}
class Person {
    private String name;
    private int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setName(String name) {
        this.name = name;
    }

}
